package com.feng.vhr.service.impl;

import com.feng.vhr.pojo.Menu;
import com.feng.vhr.mapper.MenuMapper;
import com.feng.vhr.response.Rmenu;
import com.feng.vhr.service.IMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author feng
 * @since 2022-05-09
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService {

    @Autowired
    private MenuMapper menuMapper;
    @Override
    public List<Rmenu> getMenuByRole(int uid) {
        List<Rmenu> menuByRole = menuMapper.getMenuByRole(uid);
        return menuByRole;
    }

    @Override
    public List<Rmenu> getAllMenu() {
        List<Rmenu> allMenu = menuMapper.getAllMenu();
        return allMenu;
    }
}
